<?=$this->render ( 'public/left.phtml' );?>
<div class="admin-right">
<div class="admin-menu">
<li><a href="/admin/site">小站列表</a></li>
<li><a href="/admin/site/site/do/create">创建小站</a></li>
</div>
<div class="clear"></div>
<div class="admin-menu1"><a href="/admin/site">小站列表</a>><a
	href="/admin/site/model/site_id/<?=$this->siteInfo ['site_id']?>"><?=$this->siteInfo ['site_name']?></a>><a
	href="/admin/site/article/model_id/<?=$this->modelInfo ['model_id']?>"><?=$this->modelInfo ['model_name']?></a></div> 
  <?php
		if ($this->do == 'addArticle') {?>
 <div class="admin-create">
<form id="form1" name="form1" method="post"
	action="/admin/site/article/do/addArticle">
<div class="title">&nbsp;发表文章</div>
<table>
	<tr>
		<td>文章名称</td>
		<td><input type="text" name="article_title" id="article_title"
			class="input" /></td>
	</tr>
	<tr>
		<td>文章内容</td>
		<td><textarea name="article_content" id="article_content" cols="45" rows="5" class="input1" ></textarea></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="提 交" /> <input type="reset"
			name="button" id="button" value="重置" /> <input name="site_id"
			type="hidden" id="site_id" value="<?=$this->siteInfo ['site_id']?>" />
		<input name="model_id" type="hidden" id="model_id"
			value="<?=$this->modelInfo ['model_id']?>" /> <input
			name="site_seo_name" type="hidden" id="site_seo_name"
			value="<?=$this->siteInfo ['site_seo_name']?>" /></td>
	</tr>
</table>
</form>
</div>
  <?php
	}
		elseif ($this->do == 'editArticle') {
			?>
 <div class="admin-create">
<form id="form1" name="form1" method="post"
	action="/admin/site/article/do/editArticle">
<div class="title">&nbsp;编辑文章</div>
<table>
	<tr>
		<td>文章名称</td>
		<td><input type="text" name="article_title" id="article_title"
			class="input" value="<?=$this -> articleInfo ['article_title']?>" /></td>
	</tr>
	<tr>
		<td>文章内容</td>
		<td><textarea name="article_content" id="article_content" cols="45"
			rows="5" class="input1" maxH=0  maxH=0 ><?=$this -> articleInfo ['article_content']?></textarea></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type="submit" value="提 交" /> <input type="reset"
			name="button" id="button" value="重置" /> <input name="article_id"
			type="hidden" id="article_id"
			value="<?=$this -> articleInfo ['article_id']?>" /></td>
	</tr>
</table>
</form>
</div>

<?
		}
		else {
			?> 
  <div class="title">文章列表 <span
	style="font-size: 12px; font-weight: normal;"><a
	href="/admin/site/article/model_id/<?=$this -> model_id?>/do/addArticle">添加</a></span></div>

<div class="admin-list">
     <?php
			foreach ( $this -> articleList as $item ) {
				?>
      <p><a
	href="/site/article/show/article_id/<?=$item ['article_id']?>"
	target="_blank"><?=$item ['article_title']?></a><span class="admin-do"><a
	href="/admin/site/article/do/editArticle/article_id/<?=$item ['article_id']?>">编辑</a></span></p>
	<?
			}
			?>
	</div>
<?
		}
		?>
 

</div>
<!-- end admin-right-->




